<script type="text/javascript">
function insert(file)
{
  $("#<?=$rt_tag?>", top.document).val(file);
  $("#<?=$rt_tag?>", top.document).change();
  parent.$.fn.colorbox.close();
}
</script>
<div class="media-upload-header">
    <ul id="menu">
        <li><a href="<?=base_url()?>index.php/filemanager/index_new/<?=$dir_folder;?>/<?=$rt_tag?>" <?if($current_tab=='index_new'){echo ' class="current"';}?>><?=lang('library');?></a></li>
        <li><a href="<?=base_url()?>index.php/filemanager/upload_new/<?=$dir_folder;?>/<?=$rt_tag?>" <?if($current_tab=='upload_new'){echo ' class="current"';}?>><?=lang('upload_file');?></a></li>
    </ul>
</div>
<div style="padding: 20px;height: 350px; overflow: auto;">
    <table class="site">
    <?
    foreach($list as $rs):
   // $img = explode('/',$rs->lb_url);
    ?>
        <tr>
            <td>
                <a id="cboxClose" href="javascript:;" onclick="insert('<?=$rs->lb_name?>');"><?=$this->icon_library->loadtypefile($rs->lb_url,$rs->lb_ext)?></a>
            </td>
            <td>
                <a id="cboxClose" href="javascript:;" onclick="insert('<?=$rs->lb_name?>');"><?=$rs->lb_name?></a>
            </td>
            <td style="width: 120px;font-weight: bold;">
                <a id="cboxClose" href="javascript:;" onclick="insert('<?=$rs->lb_name?>');"><?=lang('choose_file');?></a>
            </td>
        </tr>
    <? endforeach;?>
    </table>
    <div class="pages"><?=$pagination?></div>
</div>